<!DOCTYPE html>
{% load static %}
<html>
<head>
    <meta charset="utf-8">
    <title>Network Traffic Watcher</title>
    <!-- 引入 echarts.js -->
    <script src="{% static 'js/echarts.min.js' %}"></script>
    {% comment %} <script src="echarts.min.js"></script> {% endcomment %}
</head>
<body>
    
    <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
    <div id="main" style="width: 1200px;height:400px;"></div>
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: {{ hello }}
            },
            tooltip: {},
            legend: {
                data:['length']
            },
            xAxis: {
                data: [{{ dic.ip1 }},{{ dic.ip2 }},{{ dic.ip3 }},"0.0.0.0","0.0.0.1","0.0.0.2"]
            },
            yAxis: {},
            series: [{
                name: 'Traffic flow',
                type: 'bar',
                data: [{{ dic.fl1 }}, {{ dic.fl2 }}, {{ dic.fl3 }}, 36, 0, 0]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>
</body>
</html>